//
//  cahanzidingyiViewController.m
//  商城
//
//  Created by runone02 on 2018/9/21.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "cahanzidingyiViewController.h"
#import <XLsn0wKit.h>

@interface cahanzidingyiViewController ()
/** */
@property (nonatomic,strong) XLsn0wTextView *testView;
@end

@implementation cahanzidingyiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
//    [self loadUIView];
    [self loadUI];
}

- (void)loadUIView{
    self.testView = [[XLsn0wTextView alloc]init];
    self.testView.layer.borderWidth = 1.0f;
    self.testView.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.testView.layer.cornerRadius = W_RATIO(10);
    self.testView.clipsToBounds = YES;
    self.testView.placeholder = @"输入mmmmmmmkkkkss";
    [self.view addSubview:self.testView];
    [self.testView setPlaceholderFont:TITLE_FONT(30)];
    [self.testView setPlaceholderOpacity:0.8];
    [self.testView setPlaceholderColor:[UIColor redColor]];
    [self.testView addTextViewBeginEvent:^(XLsn0wTextView *text) {
        NSLog(@"开始编辑");
    }];
    
    [self.testView addTextViewEndEvent:^(XLsn0wTextView *text) {
        NSLog(@"结束编辑");
    }];
    [self.testView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.view).with.offset(kTopBarHeight);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(ScreenW);
    }];

    
    [self showGifLoding:nil inView:self.view];
    
    [XLsn0wShow showCenterWithText:@"需要显示的内容"];
    
//    MKButtonEdgeInsetsStyleTop
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.backgroundColor = [UIColor redColor];
    [btn setImage:IMAGE(@"flzq_nav_list") forState:UIControlStateNormal];
    [btn setTitle:@"anniu " forState:UIControlStateNormal];
    btn.titleLabel.font = TITLE_FONT(26);
    [self.view addSubview:btn];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.testView.mas_bottom).with.offset(20);
        make.centerX.mas_equalTo(self.view);
        make.width.height.mas_equalTo(self.view);
    }];
}

- (void)loadUI{
    [XLsn0wShow showTopWithText:@"监测版本更新"];
    
    [XLsn0wVersionManager xlsn0w_updateVersionWithAppStoreID:@"1014895889" showInCurrentController:self isShowReleaseNotes:NO];

}
@end
